home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #11
/
Amiga Plus CD - 2004 - No. 11.iso
/
AmiSoft
/
Comm
/
www
/
tidy_os4.lha
/
tidy
/
build
/
rpm
/
tidy.spec
< prev
Wrap
Text File
|
2004-07-25
|
5KB
|
188 lines
#
# Tidy version is 02 Oct 2003 that is 10022003
# First edit this file and set the version number
# You need to unpack the original source and edit the Makefile
# and point the prefix as follows:
# runinst_prefix=${RPMTMP}
# devinst_prefix=${RPMTMP}
# Copy this source tidy-MMDDYYYY.tgz to directory /usr/src/redhat/SOURCES
#
####################################################################
# To Build the new RPM package for tidy_rpm, to be uploaded
# to ftp.redhat.com do the following:-
# cd /usr/src/redhat; mkdir -p BUILD SRPMS RPMS/i386
#
# Use the following commands - see 'man rpm' and 'man rpmbuild'
# rpmbuild --showrc
# To prep : rpmbuild --short-circuit -bp /usr/src/redhat/SPECS/tidy_rpm*.spec
# Build : rpmbuild --short-circuit -bc
# Install : rpmbuild --short-circuit -bi
# List : rpmbuild --short-circuit -bl
# Bin/Src : rpmbuild -ba
# Build from TAR gzip source code with : rpmbuild -ta tidy.tar.gz
####################################################################
##
## Preamble:
##
Summary: tidy - Program for tidying up messy HTML files
Name: tidy
# Version is 2 Oct 2003 - 10022003
Version: 02October2003
Release: 1
Copyright: GPL
Group: Applications/Tools
%define mainurl http://tidy.sourceforge.net
%define source_code_name %{name}_src.tgz
%define url http://tidy.sourceforge.net
%define builddir $RPM_BUILD_DIR/%{name}-%{version}
# You cannot have $$ (process id)in rpmtmp below since it will
# be different for install and build sections
%define rpmtmp $RPM_BUILD_DIR/rpm_tmp_directory-%{name}-%{version}-%{release}
#Source0: %{url}/%{name}-%{version}.tgz
Source0: %{url}/%{source_code_name}
#Source1: %{name}.init
#Source2: %{name}-%{version}.tgz
#Patch0: %{name}-%{version}-rh.patch
#Patch1: %{name}-%{version}-teo.patch
Packager: Al Dev alavoor[at]yahoo.com
Buildroot: /var/tmp/%{name}-root
BuildArchitectures: noarch
#Prereq: /sbin/chkconfig /sbin/ldconfig /usr/sbin/useradd
Prereq: /usr/sbin/useradd
Url: %{url}
#Requires: %{name}
Summary(de): %{name} german-summary
Summary(fr): %{name} french-summary
Summary(tr): %{name} turkey-summary
##
## Description
##
%description
%{name}: The tidy is a program for tidying up messy HTML files.
When editing HTML its easy to make mistakes. Would not it be nice if
there was a simple way to fix these mistakes automatically and tidy up
sloppy editing into nicely layed out markup? Dave Raggetts HTML TIDY
is a free utility for doing just that. It also works great on the
atrociously hard to read markup generated by specialized HTML editors
and conversion tools, and can help you identify where you need to pay
further attention on making your pages more accessible to people
with disabilities.
##
## Prep section:
##
%prep
rm -rf $RPM_BUILD_ROOT
%setup -q
#%patch0 -p1 -b .rh
##
## Build section:
##
%build
(
echo "In build section ..."
cd %{builddir};
rm -rf %{rpmtmp}
mkdir -p %{rpmtmp}
export RPMTMP=%{rpmtmp} # So that you can access from Makefiles with $(RPMTMP)
#pwd && ./configure --prefix=%{rpmtmp}
# If there is no configure then
# Should modify your Makefile using $(RPMTMP)
pwd
cd %{builddir}/build/gmake;
make all && make && make install
)
#( cd $RPM_BUILD_DIR; pwd && tar xzf %{builddir}.tgz )
##
## Install section:
##
%install
rm -rf $RPM_BUILD_ROOT
PATH=/usr/sbin:$PATH
#useradd -M -r -d /var/lib/%{name} -s /bin/bash \
# -c "wvware package" %{name} || :
(
# For maintaining separate versions of packages do ...
#mkdir -p $RPM_BUILD_ROOT/var/lib/%{name}/%{version}
#cd $RPM_BUILD_ROOT/var/lib/%{name}/%{version}
#cp -pr %{rpmtmp}/* .
#( cd $RPM_BUILD_ROOT/var/lib/%{name}; ln -s %{version} current )
# Or alternatively copy to default locations as below...
mkdir -p $RPM_BUILD_ROOT/usr
cd $RPM_BUILD_ROOT
mv %{rpmtmp}/* $RPM_BUILD_ROOT/usr
#chown -R %{name}.%{name} *
chmod -R 644 * # read for all and write for user
find . -type d -exec chmod a+rx {} \;
find . -type f -name "*.so" -exec chmod a+rx {} \;
#chmod a+rx run-%{name} # read for all and write for user
)
##
## Pre-install section:
##
%pre
#useradd -M -o -r -d /var/lib/%{name} -s /bin/bash \
# -c "tidy Package" %{name} >/dev/null 2>&1 || :
#%post -p /sbin/ldconfig
#%postun -p /sbin/ldconfig clients
#%preun
#if [ $1 = 0 ] ; then
# chkconfig --del %{name}
#fi
#%postun
#/sbin/ldconfig
#if [ $1 = 0 ] ; then
# userdel %{name} >/dev/null 2>&1 || :
#fi
##
## Clean section:
##
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{rpmtmp}
##
## Files section:
##
# ----> These are files in the %{name}-x.x.x.rpm package
%files
#%defattr(-,%{name},%{name})
#%defattr(-,root,root)
#%config /etc/rc.d/init.d/*
#%doc doc/*.ps.gz
#%doc howto
#
# Use either /, or /usr or /var as below :
/
#
# ----> These are files in the %{name}-data-*.rpm package
#%files data
#%attr(-,%{name},%{name}) %dir /var/lib/%{name}
#%attr(-,%{name},%{name}) %config /var/lib/%{name}/*
#/usr/bin/somefilename
################################################################
%changelog
* Mon Oct 25 2003 Al Dev (Alavoor Vasudevan) <alavoor[at]yahoo.com>
- Initial version of %{name} rpm
################################################################